
var getIntersectionNode = function (headA, headB) {
    let left = headA
    let right = headB
    while (left !== right) {
        left = left ? left.next : headB
        right = right ? right.next : headA
    }
    return left
};